import React from 'react';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import asyncLoadComponent from '../common/async-component';

// import RegisterForm from '../login/register';
// import ResetPasswordForm from '../login/reset-password';
// const ResetPasswordForm = asyncLoadComponent(() => import('../login/reset-password'))
// const RegisterForm = asyncLoadComponent(() => import('../login/register'))

import NoteSearchListForm from '../list/note-search-list';
import TypeDisplayForm from '../list/type-display';
import TypeListForm from '../list/type-list';
import LoginForm from '../login/login';
// import NoteItemForm from '../list/note-item-form';
// import ImportNoteForm from '../list/import-note/import-note-form';
// import StatsForm from '../list/stats/stats';
// import NoteListForm from '../list/note-list';

// const NoteSearchListForm = asyncLoadComponent(() => import('../list/note-search-list'))
// const TypeDisplayForm = asyncLoadComponent(() => import('../list/type-display'))
// const TypeListForm = asyncLoadComponent(() => import('../list/type-list'))
// const LoginForm = asyncLoadComponent(() => import('../login/login'))
const NoteItemForm = asyncLoadComponent(() => import('../list/note-item-form'))
const ImportNoteForm = asyncLoadComponent(() => import('../list/import-note/import-note-form'))
const StatsForm = asyncLoadComponent(() => import('../list/stats/stats'))
const NoteListForm = asyncLoadComponent(() => import('../list/note-list'))

const MyRouter = () => {
    return (
        <Router>
            <Routes>
                <Route path='/' element={<NoteListForm />} />
                <Route path='/login' element={<LoginForm />} />
                {/* <Route path='/register' element={<RegisterForm />} />
                <Route path='/reset-password' element={<ResetPasswordForm />} /> */}
                <Route path='/stats' element={<StatsForm />} />
                <Route path='/import-note' element={<ImportNoteForm />} />
                <Route path='/note-edit' element={<NoteItemForm />} />
                <Route path='/note-search' element={<NoteSearchListForm />} />
                <Route path='/types' element={<TypeListForm />} />
                <Route path='/type-display/:typeId' element={<TypeDisplayForm />} />
            </Routes>
        </Router>
    )
}

export default MyRouter